package popcorn.ticket.dao;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import popcorn.ticket.entity.Collections;
import popcorn.ticket.entity.CollectionsExample;

@Repository
public interface CollectionsMapper {
    long countByExample(CollectionsExample example);

    int deleteByExample(CollectionsExample example);

    int deleteByPrimaryKey(Integer collectid);

    int insert(Collections record);

    int insertSelective(Collections record);

    List<Collections> selectByExample(CollectionsExample example);

    Collections selectByPrimaryKey(Integer collectid);

    int updateByExampleSelective(@Param("record") Collections record, @Param("example") CollectionsExample example);

    int updateByExample(@Param("record") Collections record, @Param("example") CollectionsExample example);

    int updateByPrimaryKeySelective(Collections record);

    int updateByPrimaryKey(Collections record);
    //根据电影id查询
    List<Collections> selectByMovieId(Integer movieId);
    
    //电影的收藏人数
    List<Collections> selectCollNum();
    
    //根据userid查询
    List<Collections> selectByUserId(Integer userId);
    
    //收藏榜单
    List<Collections> getList();
    
    //根据用户id和电影id删除收藏
    int deleteByUMId(Collections record);
    	
    //用于判断用户是否收藏该电影
    int docoll(Collections record);

    
}